<?php
namespace app\agent\servlet;

class UserPaydetalisAgentServlet extends BaseServlet
{
	public function __construct()
	{
		parent::__construct();
	}

	/**
	* 组装查询条件
	* @param array $data
	* @return array
	*/
	public function getWhere($data = [])
	{
		$where = [];
		
		if( empty($data) )
		{
			return $where;
		}

		if( empty($data['uid']) === false )
        {
            $where[] = ['uid', '=', $data['uid']];
        }
		
		if( isset($data['status']) && $data['status'] !== '' )
		{
			$where[] = ['status', '=', $data['status']];
		}
		
		return $where;
	}

	/**
	* 整理数据
	* @param array $data
	* @return array
	*/
	public function collating($data = [])
	{
		if( empty($data) )
		{
			return $data;
		}

		return $data;
	}
}